<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
<script>
test(function(t) {
    canvas = document.createElement('canvas');
    assert_equals(canvas.getContext(''), null);
    assert_equals(canvas.getContext('2d#'), null);
    assert_equals(canvas.getContext('This is clearly not a valid context name.'), null);
    assert_equals(canvas.getContext('2d\0'), null);
    assert_equals(canvas.getContext('2\uFF44'), null);
    assert_equals(canvas.getContext('2D'), null);
    assert_throws_js(TypeError, function() {canvas.getContext()});
    assert_equals(canvas.getContext('null'), null);
    assert_equals(canvas.getContext('undefined'), null);
}, "Test that invalid canvas getContext() requests return null.");
</script>
</body>
